# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-other
pkgname=kgeotag
pkgver=1.5.0
pkgrel=1
# armhf blocked by extra-cmake-modules
# ppc64le, s390x and riscv64 blocked by qt5-qtwebengine -> marble
arch="all !armhf !ppc64le !s390x !riscv64"
url="https://apps.kde.org/kgeotag/"
pkgdesc="Photo geotagging program"
license="GPL-3.0-or-later"
makedepends="
	extra-cmake-modules
	kconfigwidgets5-dev
	kcoreaddons5-dev
	kcrash5-dev
	ki18n5-dev
	kxmlgui5-dev
	libkexiv2-kf5-dev
	marble-dev
	qt5-qtbase-dev
	samurai
	"
checkdepends="xvfb-run"
subpackages="$pkgname-lang"
_repo_url="https://invent.kde.org/graphics/kgeotag.git"
source="https://download.kde.org/stable/kgeotag/$pkgver/kgeotag-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	xvfb-run ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
d522b269ae9b57ec610f71f0e0aec30cafeec615627fb401fab4be09a2651c10ca1f9952ad790c2b9a39eb0d97f4bb190a557271f90badf9918301456f02dba6  kgeotag-1.5.0.tar.xz
"
